Repository navigation
fix(spec,plugin-webhooks)!: retire the GET webhook method and park stored GET subscriptions with a visible reason - #34239
Conversation
…ored GET subscriptions (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…ow park (WIP) Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
… the sys_webhook translation bundles Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…he sender now declares it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…andard-catalog VALIDATION_ERROR pair Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
…ptions Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
📓 Docs Drift CheckThis PR changes 2 package(s): 29 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 173 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 5ec6b175ef94fcefd74cf37ba1a3a22faf80ee99 && git checkout 5ec6b175ef94fcefd74cf37ba1a3a22faf80ee99
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 b61479cef2fd9c792411795db9f3a9e83a542565 && git checkout -B drift-repro 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3 && git merge --no-ff b61479cef2fd9c792411795db9f3a9e83a542565
node scripts/docs-audit/affected-docs.mjs --json 7be32d39fa62bd6e0f7c0a0054569b22bfb3dfd3
|
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review claim · head b61479c · 2026-11-16T03:05Z (review-c, S6; L1 ACCEPT read + L2 CONTRACT_REVIEW_TIER record, spec schema + narrowing faces) |
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 Request: review · PR #34239 · area S6 · Fixes #34098 · head
Generated by Claude Code |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Contract reviewServed-tier: PR #34239 (Fixes #34098), spec schema face plus the declared narrowing. Inputs read: card #34098 body and all five comments (triage 6899464029, ruling 6902187601, claims 6902286425 / 6902292087, dev report 6905346098); the PR body, file list (30 files) and net diff against Remainder, the lane seat's ACCEPT at TIER_DEFAULT and not judged in ④: the two test files, the 21 generated translation files, the two docs pages and the changeset body's prose. They were read only where a ① or ② judgment needed them. Check-runs on the head: 68 runs, every conclusion ① Derived judgments
② Semver level
Clause-②: no (narrowing). Correct: a value an author could write is now refused, and nothing is widened. ③ Boundary flags
④ Design judgment
The narrowing, against the published spec on main and ruling A. It makes the spec's own refusal real and takes no working capability away. On main the spec advertises GET while every delivery carries a body, so no GET webhook ever delivered (card evidence;
Attempts to break it, all negative: a GET row with no triggers is refused earlier by the existing no-triggers path and matches no event; the record validator's option check runs over the values a write supplies (
One boundary of the park, stated so nobody over-reads it. The park reaches No must-fix, no should-fix. N1 (nit) — Three sentences in N2 (nit) — The N3 (nit) — Implemented-by: VERDICT: PASS |
|
domain:server#5 · zhuangjianguo · session_01QsR2jRMKz5NhWVrE4E1U5x Review — PASSHead-sha: What I checked:
Accepted nits (prose face or carried elsewhere):
Sequencing: ship in the same release as #34067, as the body says. Not governed: the area lands this PR per |
|
domain:server#5 · zhuangjianguo · session_01QsR2jUZKdq3PK2Sab53cT3 席位核对ACCEPT · area S6 lands PR #34239 at head
Generated by Claude Code |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43797161496 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steedos · project thread
Fixes #34098
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: none —
git grepofskills/finds no webhookmethodvalue taught anywhere, so no page namesGETas a webhook method.Maintainer ruling (6902187601), quoted as tapped: 「A 从契约中移除 GET」 — spec 枚举和 sys_webhook 下拉都去掉 GET,属破坏性变更;已存的 GET 行停用并写明原因,不自动改成 POST。
维护者速读
packages/plugins/plugin-webhooks/src/auto-enqueuer.ts(parseRow里的停用分支与刷新循环跳过凭据),packages/spec/src/automation/webhook.zod.ts(枚举与提示文案),.changeset/34098-webhook-method-get-retired.md。pnpm --filter @objectstack/plugin-webhooks exec vitest run --maxWorkers=2 src/webhook-get-retired-34098.test.ts,预期 7 个测试全部通过。What changes
packages/spec/src/automation/webhook.zod.ts):methodisenumWithRetiredValues(['POST','PUT','PATCH','DELETE'], { GET: … }), defaultPOSTunchanged.method: 'GET'fails parse with a prescription naming the four methods; any other unknown value keeps zod's own message.HEADwas never in the enum and is not mentioned.packages/spec/src/migrations/entries/semantic/18.webhook-method-get-retired.ts): the upgrade-guide entry. No D2 conversion: converting GET would start sending another method to an endpoint configured for GET.packages/plugins/plugin-webhooks/src/sys-webhook.object.ts): four options. The record validator now refuses an insert or update withmethod: 'get'(VALIDATION_FAILED, a field errorinvalid_optiononmethod). Theoptions.getleaf and its source hash leave all eleven locale bundles (regenerated withnode scripts/check-i18n-bundles.mjs --write --filter=webhooks; the diff is 21 deletions only).packages/plugins/plugin-webhooks/src/auto-enqueuer.ts):parseRowsetsparkedReasonwhen the stored method is retired. The refresh loop then skips credential resolution for that row (a parked subscription carries no secret and no header map), andprojectDeclareddoes the same for a declared webhook handed in by a reader that skipped the schema. Each matched event goes through the existing [security] a dropped webhook subscription leaves no durable record — and the naive fix hands an operator aredeliverbutton that sends UNSIGNED #8069 path torecordUndeliverable(): onedeadrow, 0 attempts, no signature, reason[VALIDATION_ERROR/400] webhook 'NAME' is stored with HTTP method GET … Fix: edit the webhook and set its method to POST, PUT, PATCH or DELETE …. Said once aterror. Parked events never callenqueue, so the outbox's bodyless-GET refusal from fix(service-messaging): a GET or HEAD delivery through the HTTP outbox sends no body and is signed over what it sends #34067 is not reached. The stored method is never rewritten.DeclaredWebhookSource.parseItemparses throughWebhookSchema, so a declared GET is now refused there with the existing "declared webhook failed validation — not dispatched" warning and never reaches the dispatcher.declared-webhooks.tsis unchanged.content/docs/automation/webhooks.mdxmethod row without GET, plus a "Stored GET webhooks are parked" note;content/docs/references/automation/webhook.mdxregenerated bygen:docs.Sequencing: built after PR #34067 (#33895) merged (
0d1443d0on main, merged into this branch). Reviewer note N5 on #34067: until this PR lands, a GET webhook on main leaves only a lost-event log line and no delivery row, so this PR should ship in the same release as #34067.Tests
New file
packages/plugins/plugin-webhooks/src/webhook-get-retired-34098.test.ts, on a realSqlDriver(SQLite) under a realObjectQL, withSqlHttpOutbox,MessagingServiceandHttpDispatcher:getrefusedVALIDATION_FAILED(the engine'sValidationError; REST maps it to 400) withinvalid_optiononmethod, nothing stored; update togetrefused, stored method stillpost; the four methods save; the select offers exactly four.deadrow per event with 0 attempts, no signature,method: GETand the reason; a dispatcher tick sends nothing;redeliverHttprefusedDELIVERY_NEVER_SENT; the park is reported once aterrorwithcode/status/methodin meta; the stored method readsgetthrough the driver and the engine.DeclaredWebhookSource; one handed in past the schema is parked with no credentials on the row.Spec side, in the existing
packages/spec/src/automation/webhook.test.ts: the four methods parse;GETis refused withinvalid_valueat['method']and the prescription's first sentence;TRACEkeeps zod's message.Acceptance notes
getafter the park).[VALIDATION_ERROR/400], the pairwebhook-legacy-cleartext.tscarries on its own delivery door; the save door'sVALIDATION_FAILEDis the engine record validator's own answer. A first cut stampedVALIDATION_FAILEDin plugin-webhooks andcheck:error-code-provenancerefused it (a registered code with no provenance row under the plugin's owner key); the standard-catalog member needs no ledger row, so no new error code and no ledger edit.check:generatedreports all 14 up to date and the diff touches nothing underapi-surface/,authorable-surface/orjson-schema.manifest/, as an enum-value narrowing is expected to (the def, its exports and its key are unchanged); only the generated reference page shows the four values.Verification
Final head
b61479ce(main merged at8ab601e3, #34067 included). Each reading names its head. At open,git merge-tree --write-treeagainst origin/main7be32d39is clean and none of the 27 newer main commits touches a file in this diff; main was not merged again so the battery stays on the final head.Ablations at `4ff9df50` (each restored through a trap, git diff HEAD empty, HEAD blob hashes matched)
retiredMethodParkReasonreturns undefined): 2 failed / 5 passed —expected 'pending' to be 'dead'for the stored GET row and for the declared GET past the schema.expected undefined to be defined(insert admitted),expected undefined to match object { code: 'VALIDATION_FAILED' }(update admitted), the options list.z.enum(['GET', …]): 1 failed / 24 passed —expected true to be false(GET parsed).Suites and gates
b61479ce:pnpm --filter @objectstack/plugin-webhooks test26 files, 314 tests passed;typecheckexit 0.8ab601e3:pnpm --filter @objectstack/spec test843 files, 26983 passed, 1 todo;typecheckexit 0. Spectest:repois left to CI's Test Core.8ab601e3:pnpm --filter @objectstack/spec check:generatedall 14 artifacts up to date.8ab601e3, direct dependents of plugin-webhooks:@objectstack/verifytest 52 files, 439 passed; http-conformance's two webhook files 13 passed; cli--project uniton its webhook-touching files 4 files, 176 passed (narrowed to the files that name webhooks; the full cli suites are CI's). Spec's dependents are CI's.pnpm --filter @objectstack/dogfood testunder the verify lock, closure built), final headb61479ce: VERDICT command-exit 0, Test Files 469 passed / 3 skipped (472), Tests 3974 passed / 42 skipped (4016), no failure. The same counts at69f9d19c.dispatch-gates.mjs --commands, 118 families) at69f9d19c/cf97ed4d, the first 48 re-run atb61479ce: 116 exit 0.check:error-code-provenanceandcheck:query-options-erasurewere red on the first cut (a stampedVALIDATION_FAILED, threeas anyquery-option casts in the new test) and are exit 0 after the fix. NOT MEASURED (exit 3, prerequisite not met, CI runs them):check:skill-examples(needs@objectstack/client-reactbuilt),check:dual-build-cjs-loads(needs every package built).--ranreconciliation: 118 derived, 116 run, 2 NOT-MEASURED, 0 UNRUN.pnpm lintexit 0.check-changeset-no-major,check-adr-0087-registration(registeredwebhook-method-get-retired, new here),check-closing-keyword-parity,check-partof-closing-keyword,check:nul-bytes,check:error-code-casing: exit 0 on this body and changeset.Session: https://claude.ai/code/session_01QsR2jUZKdq3PK2Sab53cT3
🤖 Generated with Claude Code